home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
E-Education
/
(c)ed9.d64
/
equations a
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
8KB
|
278 lines
1 GOTO910
2 PRINT"x[169][141][169][141]X` [234][255][169][255][133][145]L4[234]x[169]1[141][169][234][141]X`
3 [153]"xSTEPGINPUTSTOPSTEPINPUTONX` (null)(null)STEP(null)INPUTLISTLX(null)xSTEPUINPUTSTOPSTEP(null)INPUTONX`
4 PRINT"xhhh[170]h[168]hhhhhhh[152]H[138]HX`
5 [153]"hhhhhhh`
6 PRINT"[160][255][200][132][251][169][216][133][252] [241][183][138][162][160][255][200][145][251][136][208][251][230][252][202][208][246]`
7 [153]"NEWCLOSE(null)LEFT$>(null)ON(null)LET(null)(null)(null)(null)(null)(null)MID$(null)(null)`
35 IFUW=0THENSYSUU,15
40 POKEUC,0:POKEUN,0:UR$="":UI$="":IFUL=0THENUL=39
45 GETUI$:IFUI$=""THEN45
50 UA=ASC(UI$):UR=LEN(UR$):IFUA=13ANDUR>0THENPOKEUC,1:PRINT" [157]";:GOTO75
55 IFUA=20THENON-(UR=0)GOTO45:UR$=LEFT$(UR$,UR-1):PRINT"[157] [157][157]";:GOTO45
60 IFUR=ULTHEN45
65 GOSUB95:UR$=UR$+UI$:PRINTUI$;:GOTO45
75 FORUI=URTO1STEP-1:IFMID$(UR$,UI,1)=" "THENNEXT
80 UR$=LEFT$(UR$,UI):PRINT:RETURN
95 IFLEN(US$)=0THEN110
100 FORUI=1TOLEN(US$):IFUI$<>MID$(US$,UI,1)THENNEXT:UI$=""
105 RETURN
110 IFUA=46THENRETURN
115 IFUA=32ANDUR<>0THENRETURN
120 IFUA>47ANDUA<58THENRETURN
125 IFUA>64ANDUA<91THENRETURN
130 IFUA<193ORUA>218THENUI$="":RETURN
135 IFPEEK(UT)=UU%THENUI$=CHR$(UA-128)
140 RETURN
155 UZ=0:US$=UJ$:UG$=UK$:UT$=UL$:UP=UJ:UL=UK:PRINT"[147]";:POKEUY,0:POKEUX,0
160 POKEUT,UV%:POKE251,0:POKE252,UF:POKE253,0:POKE254,US/256:SYSUV:SYSUU,15
165 POKEU1,U1%:POKEU2,U2%:POKEU3,U3%-1:POKEU4,U4%:GOTO35
300 REM DERIVED FROM COMMODORE ONTARIO EDUCATIONAL SOFTWARE PROJECT 1983
310 REM PROJECT DIRECTOR: FRANK WINTER
320 REM PROGRAM NAME: EQUATION
330 REM WRITTEN BY: C. G. ANDERSON
340 REM DEVELOPED AT: ROMEO MICRO-LAB
350 REM CONTRIBUTED TO PUBLIC DOMAIN BY LOGICS ONE CONSULTANTS 2/10/80
360 REM REVISED BY: D. ARTHURS & A. WUNSCHE '82
370 REM UPDATED BY: BILL CUMBERLAND '90
400 PRINT"[147]":POKEUT,UL%:POKEUY,0:POKEUX,0:POKE646,13
405 PRINT" [201]NSTRUCTIONS [146]
410 [153]" (null)OU WILL BE ASKED TO SOLVE EQUATIONS"
412 [153]" WITH ONE VARIABLE OF THE TYPE 3X-5=7."
414 [153]" (null)HE OBJECT OF THE PROGRAM IS THE"
416 [153]" MENTAL SOLUTION OF THE EQUATION BY"
418 [153]" DETERMINING THE VALUE FOR XWAIT THAT"
420 [153]" MAKES THE EQUATION TRUE.
422 PRINT" [217]OU WILL BE GIVEN 3 ATTEMPTS BEFORE"
424 PRINT" THE CORRECT ANSWER IS GIVEN."
426 GOSUB830
428 PRINT"[153][147] [201]F YOU FAIL IN THE 3 ATTEMPTS, YOU"
430 PRINT" WILL BE SHOWN A COMPLETE SOLUTION "
432 PRINT" OF THE PROBLEM."
434 PRINT" E.G., 3X - 5 = 7"
436 PRINT" [193]DD 5 TO EACH SIDE [146]"
438 PRINT" [210]ESULT: 3X = 12"
440 PRINT" [196]IVIDE EACH SIDE BY 3 [146]"
442 PRINT" [210]ESULT: X = 4
444 [141]830
446 [153]"PRINTLOAD (null)OME PROBLEMS HAVE THE VARIABLE TERM"
448 [153]" ON THE RIGHT SIDE OF THE EQUATION"
450 [153]" AND OCCASIONALLY THERE WILL BE A"
452 [153]" VARIABLE ON BOTH SIDES."
455 [153]" (null)HEN YOU FINISH, YOUR SCORE IS THE"
456 [153]" NUMBER CORRECT ON THE FIRST TRY.":[141]592
458 [153]" CHR$(null)(null)STR$CLOSE(null)(null)LEN(null)WAIT"
495 [141] 830:[142]
500 [143] <YES> SOUND
505 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130]
510 [151]54296,15:[151]54277,42:[151]54278,250
515 [151]54276,23:[151]54273,23:[151]54272,191
520 [129]T[178]1[164]250:[130]:[151]54276,32:[129]T[178]1[164]300:[130]
525 [151]54296,0:[142]
530 [143] <YES> SOUND
535 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130]
540 [151]54296,15:[151]54277,18:[151]54278,242
545 [151]54276,33:[151]54273,4:[151]54272,48
550 [129]T[178]1[164]300:[130]:[151]54276,32:[129]T[178]1[164]400:[130]
555 [151]54296,0:[142]
560 [143] <BLIP> SOUND
565 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130]
570 [151]54296,7:[151]54277,42:[151]54278,250
575 [151]54276,23:[151]54273,23:[151]54272,191
580 [129]TM[178]1[164]30:[130]:[151]54276,32:[129]TM[178]1[164]50:[130]
585 [151]54296,0:[142]
590 [129]TM[178]1[164]500:[130]:[142]
591 [129]TM[178]1[164]1000:[130]:[142]
592 [129]TM[178]1[164]2000:[130]:[142]
595 [129]TM[178]1[164]5000:[130]:[142]
800 [153]"LOAD";:[151]UT,UU%:[151]UY,0:[151]UX,0:[151]646,3
801 [153]" A TPUG EDUCATIONAL PROGRAM":[141]590
802 [153]" FOR C 64 COMPUTERS ":[141]590
803 [153]" WAIT";
804 [153]" WAIT";
805 [153]" EQUATIONS WAIT";
806 [153]" WAIT";
807 [153]" - A - WAIT";
808 [153]" WAIT";
809 [153]" WAIT":[141]591:[141]560
810 [153]" INSTRUCTIONS? Y/N
811 GETR$:IFR$<>"Y"ANDR$<>"N"THEN811
812 IFR$="Y"THENGOSUB400
813 PRINT"[147] AND AWAY WE GO ......":GOSUB591:GOSUB500:GOSUB590
814 GOTO1000
830 GOSUB591:GOSUB560
835 POKEUN,0:PRINTLEFT$(UD$,24);"[153] [208]RESS [211][208][193][195][197][160][194][193][210] TO CONTINUE [146][155]"
840 GETUI$:IFUI$<>" "THEN840
845 RETURN
850 UP=UP+1:PRINT"[147]"LEFT$(UT$+UP$,21);RIGHT$(UP$+UG$+STR$(UP),18)
855 PRINT" --------------------------------------"
860 IFUH=0THENPRINTLEFT$(UD$,24);LEFT$(UP$,7);"[193]NSWER, THEN PRESS [210][197][212][213][210][206][146]
865 UH[178]0:[153]"":[142]
875 [153][200](UD$,24);" (null)NE MOMENT PLEASE... ":[142]
900 US[178]1024:U1[178]209:U2[178]210:U3[178]211:U4[178]214:UC[178]204:UB[178]2048:UX[178]53280:UD[178]2064
902 UT[178]53272:UU%[178]21:UL%[178]23:UP%[178]2151:UN[178]198:UY[178]53281:UU[178]2199:UE[178]2087
904 UC$[178][199](155):UV[178]1214:UF[178]196:UV[178]2238
905 UD$[178]"":UP$[178]" "
906 UT$[178]" VALQUATION"
909 [142]
910 [141]900:[153]"LOAD "
920 [137]800
1000 [153]"LOAD"UC$;:[140]:[151]UY,0:[151]UX,0
1060 [151] UT,UL%:[153]"LOAD":UP[178]0:UG$[178]"":[143] GO[211]850
1360 [153]" LEFT$OW MANY PROBLEMS WOULD":[153]
1370 [153]" YOU LIKE TO SOLVE? CMDCMD";
1385 US$[178]"1234567890":UL[178]2:[141] 35:E[178][197](UR$)
1387 [139] [201](UR$,1)[179][177]"H" [175] [200](UR$,1)[179][177]"H" [167] 1390
1388 [153]"ON ":[137]1360
1390 [139]E[177]0[167]1420
1400 [153]:[153]:[153]" (null)ESPONSE MUST BE GREATER THAN ZERO WAIT"
1405 [129]I[178]1[164]1000:[130]
1408 [153]"ON "
1410 [137]1360
1420 R[178]0
1430 [129]I[178]1[164]E:[153]"":[141]875
1440 X[178][181]([187](1)[172]21)[171]10
1450 [139]X[178]0[167]1440
1460 Y[178][181]([187](1)[172]41)[171]20
1470 Z[178][181]([187](1)[172]41)[171]20
1480 T[178][181]([187](1)[172]10)[170]1
1490 [139]T[171]X[178]0[176]T[170]X[178]0[167]1440
1500 D[178]X[170]T:F[178]X[171]T
1510 A$[178][196](X):D$[178][196](T):E$[178][196](D):F$[178][196](F)
1520 L$[178]A$
1530 [139]X[171]T[178][171]1[167]F$[178]"-"
1540 [139]X[170]T[178][171]1[167]E$[178]"-"
1550 [139]X[171]T[178]1[167]F$[178]" "
1560 [139]X[170]T[178]1[167]E$[178]" "
1570 [139]X[178][171]1[167]A$[178]"-"
1580 [139]X[178]1[167]A$[178]" "
1590 [139]T[178]1[167]D$[178]" "
1600 B$[178][196](Y):C$[178][196](Z)
1610 [139](Z[171]Y)[173]X[178][181]((Z[171]Y)[173]X)[167]1630
1620 [137]1440
1630 UG$[178]"(null)UESTION #":UP[178]I[171]1:[141] 850:[141]590:[141]560:[153] "";
1640 B[178][181]([187](1)[172]3)[170]1
1650 [139]Y[179]0[167]1730
1660 [145]B[137]1670,1690,1710
1670 [153]A$;"X +";B$;" =";C$;
1680 [137]1810
1690 [153]C$;" =";A$;"X +";B$;
1700 [137]1810
1710 [153]E$;"X +";B$;" =";C$;" +";D$;"X";
1720 [137]1810
1730 B$[178][196]([171]Y)
1740 [145]B[137]1750,1770,1790
1750 [153]A$;"X -";B$;" =";C$;
1760 [137]1810
1770 [153]C$;" =";A$;"X -";B$;
1780 [137]1810
1790 [153]F$;"X -";B$;" =";C$;" -";D$;"X";
1800 [137]1810
1810 [129]M[178]1[164]3
1820 W[178]UP:[153] [163]25);"X = ";:US$[178]"1234567890-H":UL[178]3:[141] 35:C[178][197](UR$)
1821 F1[178]0:[129]UI[178]1[164][195](UR$)
1822 [139][202](UR$,UI,1)[178]"H"[176]UI[177]1[175][202](UR$,UI,1)[178]"-"[167]F1[178]1
1823 [130]:[139] F1[178]1[167][153] [163]27);"ON CMDCMDCMDCMDCMDCMDON":[137]1820
1825 UP[178]W
1830 [153]
1840 [139]C[179][177](Z[171]Y)[173]X[167]1900
1850 [141]2030
1860 [153]" "
1865 [153]"ON";[163](40[171][195](R$))[173]2);R$
1870 [141] 830
1880 [139]C[178](Z[171]Y)[173]X[175]M[178]1[167]R[178]R[170]1
1890 [137]1970
1900 [141]2120
1910 [153]" "
1911 [153]"ON";[163](40[171][195](R$))[173]2);R$
1912 U1%[178][194](U1):U2%[178][194](U2):U3%[178][194](U3):U4%[178][194](U4)
1913 [141]830:[141]860
1914 [151]U1,U1%:[151]U2,U2%:[151]U3,U3%:[151]U4,U4%
1915 [153]"ON "
1916 [153]"ONONONONON";[163]26);" CMDCMDCMDCMDCMDCMDCMDCMDCMD";
1920 [130]M
1930 [153]" (null)HE ANSWER IS ";(Z[171]Y)[173]X;"CMD. ":[153]
1940 [153]:[153]" (null)OULD YOU LIKE TO":[141]560:[141]560
1944 [153]" SEE THE SOLUTION? (Y/N)";
1946 US$[178]"YN":UL[178]1:[141] 35:M$[178]UR$
1950 [139] M$[178]"Y"[167] [141]2210
1970 [130]I
1975 UG$[178]"(null)CORE":UP[178]0:UH[178]1:[141]850
1980 [153]" (null)OU HAVE";R;"CORRECT OUT OF";E;"TRIES."
1985 [141]591:[141]560:[153]" (null)OULD YOU LIKE TO TRY AGAIN?";
1990 [153]" (Y/N)
1995 US$="YN":UL=1:GOSUB 35:X$=UR$
2000 IF X$="Y"THEN RESTORE:GOTO1060
2002 REM
2004 PRINT"[147] [210]ETURNING TO THE DISK MENU."
2006 LOAD"MENU",8
2008 RUN
2010 END
2020 REM PRAISE LOOP
2030 K=INT(RND(1)*10)+1
2035 GOSUB500
2040 FORJ=1TOK
2050 READR$
2060 NEXTJ
2070 RESTORE
2080 RETURN
2090 DATA"[214]ERY GOOD","[212]HAT'S RIGHT","[195]ORRECT","[206]ICE WORK","[197]XCELLENT"
2100 DATA"[212]ERRIFIC","[211]UPER","[198]ANTASTIC","[199]REAT","[217]ES"
2110 REM UNPRAISE LOOP
2120 K=INT(RND(1)*10)+11
2130 FORL=1TOK
2140 R$="[201]NCORRECT.":IF M<3 THEN R$=R$+" [208]LEASE TRY AGAIN"
2150 NEXTL
2155 GOSUB530
2160 RESTORE
2170 RETURN
2180 DATA"[211]ORRY","[212]OO BAD","[201]NCORRECT","[206]O","[215]RONG"
2190 DATA "[212]HAT'S NOT RIGHT","[212]HAT'S WRONG","[194]ETTER LUCK NEXT TIME","[211]ORRY"
2195 DATA "[201]NCORRECT"
2200 REM SOLUTIONS SUBROUTINE
2210 ZZ=UP:UP=YY:UG$="[193]NSWER #":GOSUB 850:YY=UP:UP=ZZ
2215 PRINT"":ONBGOTO2220,2360,2500
2220 IFY<0THEN2260
2230 PRINT" [208]ROBLEM: ";A$;"X +";B$;" =";C$:PRINT
2240 PRINT" [211]UBTRACT ";B$;" FROM EACH SIDE[146]":PRINT
2250 GOTO2290
2260 B$=STR$(-Y)
2270 PRINT" [208]ROBLEM: ";A$;"X -";B$;" =";C$:PRINT
2280 PRINT" [193]DD ";B$;" TO EACH SIDE[146]":PRINT
2290 W=Z-Y:G$=STR$(W)
2300 PRINT" [210]ESULT: ";A$;"X =";G$:PRINT
2310 IFX=1THEN2590
2320 PRINT" [196]IVIDE EACH SIDE BY ";L$:PRINT
2330 S=W/X:S$=STR$(S)
2340 PRINT" [210]ESULT: X =";S$
2350 GOTO2590
2360 IFY<0THEN2400
2370 PRINT" [208]ROBLEM: ";C$;" =";A$;"X +";B$:PRINT
2380 PRINT" [211]UBTRACT ";B$;" FROM EACH SIDE[146]":PRINT
2390 GOTO2430
2400 B$=STR$(-Y)
2410 PRINT" [208]ROBLEM: ";C$;" =";A$;"X -";B$:PRINT
2420 PRINT" [193]DD ";B$;" TO EACH SIDE[146]":PRINT
2430 W=Z-Y:G$=STR$(W)
2440 PRINT" [210]ESULT: ";G$;" =";A$;"X":PRINT
2450 IFX=1THEN2590
2460 PRINT" [196]IVIDE EACH SIDE BY ";L$:PRINT
2470 S=W/X:S$=STR$(S)
2480 PRINT" [210]ESULT: ";S$;" = X"
2490 GOTO2590
2500 IFY<0THEN2550
2510 PRINT" [208]ROBLEM: ";E$;"X +";B$;" =";C$;" +";D$;"X":PRINT
2520 PRINT" [211]UBTRACT ";D$;"X FROM EACH SIDE[146]":PRINT
2530 PRINT" [210]ESULT: ";A$;"X +";B$;" =";C$:PRINT
2540 GOTO2240
2550 PRINT" [208]ROBLEM: ";F$;"X -";B$;" =";C$;" -";D$;"X":PRINT
2560 PRINT" [193]DD ";D$;"X TO EACH SIDE":PRINT
2570 PRINT" [210]ESULT: ";A$;"X -";B$;" =";C$:PRINT
2580 GOTO2280
2590 GOSUB830:RETURN
2600 REM PAUSE ROUTINE
2610 GOSUB83O
2640 RETURN
2650 GOTO 800
3000 REM WHC 90:12:06